perm filename PUZZLE.TIM[TIM,LSP]9 blob
sn#736725 filedate 1983-12-29 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00010 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 SAIL
C00004 00003 ELISP/UCILISP
C00005 00004 T/UCILISP
C00006 00005 LM-2
C00007 00006 ∂03-Oct-82 2050 James Bennett <csd.Bennett at SU-SCORE> initial timings
C00010 00007 PUZZLE
C00011 00008 PUZZLE
C00012 00009 NIL
C00014 00010 SCORE Dec 29, 1983 1-based arrays
C00015 ENDMK
C⊗;
;;; SAIL
(timit)
success in 2005 trials
Cpu Time = 8.736
Elapsed Time = 15.4666667
Wholine Time = 12.85
GC time = 0.421
Load Average Before = 0.560385704
Load Average After = 0.62576735
NIL
success in 2005 trials
Cpu Time = 8.762
Elapsed Time = 21.0833333
Wholine Time = 12.9333333
GC time = 0.422
Load Average Before = 0.62777853
Load Average After = 0.77028763
NIL
success in 2005 trials
Cpu Time = 8.758
Elapsed Time = 22.3166666
Wholine Time = 13.2333333
GC time = 0.422
Load Average Before = 0.85665059
Load Average After = 0.982417345
NIL
;;; PUZZLE (model B)
success in 2005 trials
Cpu Time = 7.865
Elapsed Time = 14.5666667
Wholine Time = 11.8333334
GC time = 0.0
Load Average Before = 0.63950753
Load Average After = 0.70015371
NIL
;;; ELISP/UCILISP
Elisp: 25.133 sec.
R/UCI Lisp: 75.622 sec.
R/UCI Lisp with NOUUO NIL: 25.840 sec.
;;; T/UCILISP
∂10-May-82 2101 Mabry Tyson <Tyson at SRI-AI> UCI Lisp on Basket Puzzle
Date: 10 May 1982 2055-PDT
From: Mabry Tyson <Tyson at SRI-AI>
Subject: UCI Lisp on Basket Puzzle
To: rpg at SU-AI
Results on the Basket Puzzle Benchmark for UCI-Lisp (version from UTexas-20,
tests run on SRI-AI 2060).
Compiled, slow links: 85.804 seconds (no GC)
Compiled, fast links: 23.966 seconds (no GC)
-------
;;; LM-2
;; 6. PUZZLE
(DEFUN TIME-PUZZLE ()
(TIMING "PUZZLE" (START)))
;; Compiled: 59.0 Seconds
∂03-Oct-82 2050 James Bennett <csd.Bennett at SU-SCORE> initial timings
Date: 3 Oct 1982 2046-PDT
From: James Bennett <csd.Bennett at SU-SCORE>
Subject: initial timings
To: rpg at SU-AI
Stanford-Phone: (415) 497-2225
Home-Phone: (415) 322-2233
Dick,
I got it to work. You are right about Interlisp array indicies
starting at 1 rather than 0. I thought that the ADD1's would unduly
increase the running times but I think that this effect is in the noise
after looking at the following results. First I block compiled the functions,
timed start, and then did the same with the uncompiled versions. As
you can see below, compiling had little effect. I would say that array
access sucks in Interlisp. I suggest that you run the breakdown package
on this function just to see were it is spending its time, jim
NIL
←(TIME (START) 1 0] ; bcompl'd version
success in 2005 trials
0 conses
1481.138 seconds
2782.667 seconds, real time
NIL
←LOAD(PUZZLE]
FILE CREATED 3-Oct-82 13:00:20
PUZZLECOMS
(START redefined)
(DEFINE-ARRAY redefined)
collecting arrays
7820, 10380 free cells
<CSD.BENNETT>PUZZLE..10
←REDO TIME ; expr version
success in 2005 trials
0 conses
1481.692 seconds
2397.734 seconds, real time
NIL
←PL START
CODE : #176777
EXPR : (LAMBDA NIL (& 0) --)
←UNSAVEDEF(START CODE]
CODE
←REDO TIME
success in 2005 trials
0 conses
1479.684 seconds
2426.698 seconds, real time
NIL
←DRIBBLE]
-------
;;; PUZZLE
Common Lisp arrays
D3
Open-compiled, safe, Display-up
Elapsed 14.9
CPU 14.9
Open-compiled, safe, Display-down
Elapsed 14.0
CPU 14.0
Closed-compiled, safe, Display-up
Elapsed 49.3
CPU 49.3
;;; PUZZLE
Common Lisp arrays
D2
Open-compiled, safe, Display-up
Elapsed 121.0
SWAP .252
CPU 121.0
Open-compiled, safe, Display-down
Elapsed 91.0
CPU 91.0
Closed-compiled, safe, Display-up
Elapsed 278.0
CPU 278.0
InterLisp arrays (1-based version)
Elapsed 616.0
SWAP .087
CPU 616.0
PGFLTS 2
;;; NIL
PUZZLE
Fixnum arithmetic, as always.
Make the following macro definition
(defmacro deftable (name type &rest dimensions)
(let ((tabvar (symbolconc '* name '-table*)))
`(progn 'compile
(defparameter ,tabvar
(make-array (list ,@dimensions))
,.(cond ((eq type 'fixnum) `((fill ,tabvar 0)))
((eq type 'flonum) `((fill ,tabvar 0.0))))
(defmacro ,name (&rest dimensions)
,(cond ((= (length dimensions) 1) ``(sgvref ,',tabvar ,@dimensions))
(t ``(aref ,',tabvar ,@dimensions)))))))
and change calls to ARRAY to DEFTABLE, calls to STORE to SETF.
(Hopefully not causing order-of-evaluation problems.) To really bum
this i could use SGVREF for the one-dimensional cases.
cpu=497.85,elapsed=498.02,pagefaults=4
Presumably this is because 2-dim aref is losing its lunch. I think that
that overshadows the generic reference to the one-dimensional case, so i'm
not going to bother doing that case. (The multi-dimensional generic aref
minisubr has been mostly written, but got bumped down the queue some time
ago so never got debugged nor installed.) A new compiler and some array
declarations would work wonders.
;;; SCORE Dec 29, 1983 1-based arrays
using PUZZLE.IL0[TIM,LSP]
Success in 2005 trials.
0 conses
121.028 seconds
7.926 seconds, garbage collection time
NIL
←